﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>FreeBasic</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body { 
	/* Default Font */
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11pt;
}
</style>

</head>

<body><pre>' 一个场景
Function MainScreen(msg As Integer, param As Integer, eve As XGE_EVENT Ptr) As Integer
	Select Case msg
		Case XGE_MSG_FRAME				' 逻辑处理
			
		Case XGE_MSG_DRAW				' 绘图
			
		Case XGE_MSG_MOUSE_MOVE			' 鼠标移动
			
		Case XGE_MSG_MOUSE_DOWN			' 鼠标按下
			
		Case XGE_MSG_MOUSE_UP			' 鼠标弹起
			
		Case XGE_MSG_MOUSE_DCLICK		' 鼠标双击
			
		Case XGE_MSG_MOUSE_WHELL		' 鼠标滚轮滚动
			
		Case XGE_MSG_KEY_DOWN			' 键盘按下
			
		Case XGE_MSG_KEY_UP				' 键盘弹起
			
		Case XGE_MSG_KEY_REPEAT			' 按键重复按下
			
		Case XGE_MSG_GOTFOCUS			' 拥有焦点
			
		Case XGE_MSG_LOSTFOCUS			' 失去焦点
			
		Case XGE_MSG_MOUSE_ENTER		' 鼠标移入
			
		Case XGE_MSG_MOUSE_EXIT			' 鼠标移出
			
		Case XGE_MSG_LOADRES			' 加载资源
			
		Case XGE_MSG_FREERES			' 卸载资源
			
		Case XGE_MSG_CLOSE				' 窗口关闭
			Return -1
	End Select
End Function</pre></body>
</html>
